#ifndef QSS_STYLE_H
#define QSS_STYLE_H
#include <QString>

// #define PUSHBUTTON_ARM_HEIGHT   60
// #define PUSHBUTTON_ARM_WIDTH    80
#define BUTTON_SELECT_HEIGHT    75
#define BUTTON_SELECT_WIDTH     125
#define PUSHBUTTON_ARM_HEIGHT   80
#define PUSHBUTTON_ARM_WIDTH    110
// static const int label_joint_height = 35;
// static const int label_joint_width = 55;
// static const int lineEdit_joint_height = 35;
// static const int lineEdit_joint_width = 65;
// #define LABEL_JOINT_HEIGHT  35
// #define LABEL_JOINT_WIDTH   55
// #define LINEEDIT_JOINT_HEIGHT   35
// #define LINEEDIT_JOINT_WIDTH    65 

#define LABEL_JOINT_HEIGHT  60
#define LABEL_JOINT_WIDTH   80
#define LINEEDIT_JOINT_HEIGHT   60
#define LINEEDIT_JOINT_WIDTH    115 

#define PUSHBUTTON_AUTO_HEIGHT  100
#define PUSHBUTTON_AUTO_WIDTH   180
#define AUTO_ICON_SIZE          120

// 动画绘图参数设置
#define ANIMATION_WIDTH         1050
#define ANIMATION_HEIGHT        621
#define TRUCK_POS_X     120
#define TRUCK_POS_Y     300
#define ROBOT_SCALED_SIZE   60
#define TRASH_SCALED_SIZE   80
#define TRUCK_SCALED_SIZE   180

#define AUTO_ARROW_WIDTH    300
#define AUTO_LABEL_WIDTH    300
#define AUTO_LABEL_HEIGHT   100

#define CHASIS_MOVE_SIZE1  90
#define CHASIS_MOVE_SIZE2  120
#define GRIPPER_SIZE    105
#define EN_BUTTON_HEIGHT    90
#define EN_BUTTON_WIDTH     195

QString label_mode_style = "font-family: Microsoft YaHei; font:bold; font-size: 45px; color: black;";
QString label_status_style = "font-family: Microsoft YaHei; font:bold; font-size: 45px; color: black;";
QString label_status_man_style = "font-family: Microsoft YaHei; font:bold; font-size: 45px; color: rgb(239,239,239);";

QString label_step_style = "font-family: Microsoft YaHei; font:bold; font-size: 40px; "
                                   "color: black; border: 5px solid black; "
                                   "border-radius:15px; border-color:grey; background-color:grey";

QString label_step_style_green = "font-family: Microsoft YaHei; font:bold; font-size: 40px; "
                                        "color: white; border: 5px solid green; "
                                        "border-radius:15px; border-color:green; background-color:green";

QString label_joint_info_style = "font-family: Microsoft YaHei; font:bold; font-size: 25px; color: black; text-align: center;"
                                        "background-color: lightgray;"
                                        "border-top-left-radius: 10px;"
                                        "border-bottom-left-radius: 10px;"
                                        "border-top-right-radius: 0px;"
                                        "border-bottom-right-radius: 0px;"
                                        "padding: 5px;";

QString label_pos_style = "font-family: Microsoft YaHei; font:bold; font-size: 25px; color: black; text-align: center;"
                          "background-color: lightgray;"
                          "border-top-left-radius: 10px;"
                          "border-bottom-left-radius: 10px;"
                          "border-top-right-radius: 0px;"
                          "border-bottom-right-radius: 0px;"
                          "padding: 5px;";

QString lineEdit_pos_style = "font-family: Microsoft YaHei; font:bold; font-size: 25px; color: red; border: 5px solid lightgray; text-align: center;";

QString lineEdit_L_arm_style = "font-family: Microsoft YaHei; font:bold; font-size: 25px; color: blue; border:5px solid lightgray; text-align: center;";

QString lineEdit_R_arm_style = "font-family: Microsoft YaHei; font:bold; font-size: 25px; color: green; border:5px solid lightgray; text-align: center;";

QString button_container_style = "background-color: rgb(210,210,210); "
                                        "border-radius: 34px;"
                                        "min-height:68Px;"
                                        "min-width: 200px;";
                                    
QString label_joint_style = "font-family: Microsoft YaHei; font:bold; font-size: 30px; color: black;";

QString pushButton_auto_style = R"(
    QPushButton {
        /* 基础样式 */
        color: white;
        font-size: 45px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        padding: 12px 20px;
        border-radius: 30px;
        
        /* 超现实3D效果 - 多层渐变和阴影 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #99ff99, /* 极亮顶部 */
            stop:0.15 #77dd77, 
            stop:0.4 #55bb55, 
            stop:0.6 #44aa44,
            stop:0.85 #338833,
            stop:1 #226622 /* 极深底部 */
        );
        
        /* 三层边框效果 */
        border: 1px solid rgba(255,255,255,0.4); /* 最外层高光 */
        border-top: 1px solid rgba(255,255,255,0.6);
        border-bottom: 1px solid rgba(0,0,0,0.3);
        
        /* 内部边框 */
        border-radius: 30px;
        
        /* 表面纹理 */
        background-clip: padding-box;
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #aaffaa, 
            stop:0.15 #88ee88, 
            stop:0.4 #66cc66, 
            stop:0.6 #55bb55,
            stop:0.85 #44aa44,
            stop:1 #338833
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #44aa44, 
            stop:0.15 #338833, 
            stop:0.4 #227722, 
            stop:0.6 #116611,
            stop:0.85 #005500,
            stop:1 #004400
        );
        
        /* 按下时的强烈反馈 */
        border: 1px solid rgba(0,0,0,0.3);
        border-top: 1px solid rgba(0,0,0,0.5);
        
        padding-top: 16px;
        padding-bottom: 10px;
    }
    
    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 1px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_en_style = R"(
    QPushButton {
        color: black;
        font-size: 30px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        padding: 12px 20px; /* 固定内边距，避免文字位置变化 */
        border-radius: 25px;
        background-clip: padding-box;
        checkable: true; /* 开启点击保持状态 */
    }

    /* 未选中状态（灰色） */
    QPushButton:!checked {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #f5f5f5,
            stop:0.2 #e0e0e0,
            stop:0.5 #d0d0d0,
            stop:0.8 #c0c0c0,
            stop:1 #b0b0b0
        );
        border: 3px solid rgba(255,255,255,0.8);
        border-top: 1px solid rgba(255,255,255,0.9);
        border-bottom: 1px solid rgba(0,0,0,0.2);
    }

    /* 选中状态（绿色，无文字下沉） */
    QPushButton:checked {
        color: white;
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #99ff99,
            stop:0.2 #77dd77,
            stop:0.5 #55bb55,
            stop:0.8 #339933,
            stop:1 #227722
        );
        border: 3px solid rgba(0,0,0,0.3);
        border-top: 1px solid rgba(0,0,0,0.5);
        /* 移除 padding 调整，文字位置固定 */
        padding-top: 12px; 
        padding-bottom: 12px;
    }

    QPushButton:hover {
        /* 统一悬停效果，避免状态切换时抖动 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #fafafa; /* 未选中悬停 */
            stop:1 #e8e8e8;
        );
        QPushButton:checked:hover {
            background: qlineargradient(
                x1:0, y1:0, x2:0, y2:1,
                stop:0 #aaffaa; /* 选中悬停 */
                stop:1 #88ee88;
            );
        }
    }

    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 1px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_man_style = R"(
    QPushButton {
        font-family: Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        padding: 12px 20px;
        border-radius: 30px;
        
        /* 蓝色系多层次渐变 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #66a3ff, /* 顶部亮蓝色 */
            stop:0.2 #4d94ff,
            stop:0.4 #3385ff,
            stop:0.6 #1a75ff,
            stop:0.8 #0066ff,
            stop:1 #005ce6 /* 底部深蓝色 */
        );
        
        /* 三层边框效果 */
        border: 2px solid rgba(255,255,255,0.3);
        border-top: 2px solid rgba(255,255,255,0.5);
        border-bottom: 2px solid rgba(0,0,0,0.3);
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #7ab3ff,
            stop:0.2 #66a3ff,
            stop:0.4 #4d94ff,
            stop:0.6 #3385ff,
            stop:0.8 #1a75ff,
            stop:1 #0066ff
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #1a75ff,
            stop:0.2 #0066ff,
            stop:0.4 #005ce6,
            stop:0.6 #0052cc,
            stop:0.8 #0047b3,
            stop:1 #003d99
        );
        
        border: 2px solid rgba(0,0,0,0.3);
        border-top: 2px solid rgba(0,0,0,0.5);
        
        padding-top: 16px;
        padding-bottom: 10px;
    }
    
    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 2px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_start_style = R"(
    QPushButton {
        font-family: Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        padding: 12px 20px;
        border-radius: 30px;
        
        /* 蓝色系多层次渐变 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #66a3ff, /* 顶部亮蓝色 */
            stop:0.2 #4d94ff,
            stop:0.4 #3385ff,
            stop:0.6 #1a75ff,
            stop:0.8 #0066ff,
            stop:1 #005ce6 /* 底部深蓝色 */
        );
        
        /* 三层边框效果 */
        border: 2px solid rgba(255,255,255,0.3);
        border-top: 2px solid rgba(255,255,255,0.5);
        border-bottom: 2px solid rgba(0,0,0,0.3);
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #7ab3ff,
            stop:0.2 #66a3ff,
            stop:0.4 #4d94ff,
            stop:0.6 #3385ff,
            stop:0.8 #1a75ff,
            stop:1 #0066ff
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #1a75ff,
            stop:0.2 #0066ff,
            stop:0.4 #005ce6,
            stop:0.6 #0052cc,
            stop:0.8 #0047b3,
            stop:1 #003d99
        );
        
        border: 2px solid rgba(0,0,0,0.3);
        border-top: 2px solid rgba(0,0,0,0.5);
        
        padding-top: 16px;
        padding-bottom: 10px;
    }
    
    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 2px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_stop_style = R"(
    QPushButton {
        font-family: Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        padding: 12px 20px;
        border-radius: 30px;
        
        /* 红色系多层次渐变 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff6666, /* 顶部亮红色 */
            stop:0.2 #ff4d4d,
            stop:0.4 #ff3333,
            stop:0.6 #ff1a1a,
            stop:0.8 #ff0000,
            stop:1 #e60000 /* 底部深红色 */
        );
        
        /* 三层边框效果 */
        border: 2px solid rgba(255,255,255,0.3);
        border-top: 2px solid rgba(255,255,255,0.5);
        border-bottom: 2px solid rgba(0,0,0,0.3);
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff8080,
            stop:0.2 #ff6666,
            stop:0.4 #ff4d4d,
            stop:0.6 #ff3333,
            stop:0.8 #ff1a1a,
            stop:1 #ff0000
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff1a1a,
            stop:0.2 #ff0000,
            stop:0.4 #e60000,
            stop:0.6 #cc0000,
            stop:0.8 #b30000,
            stop:1 #990000
        );
        
        border: 2px solid rgba(0,0,0,0.3);
        border-top: 2px solid rgba(0,0,0,0.5);
        
        padding-top: 16px;
        padding-bottom: 10px;
    }
    
    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 2px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_pause_style = R"(
    QPushButton {
        font-family: Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        padding: 12px 20px;
        border-radius: 30px;
        
        /* 橙色系多层次渐变 */
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff9933, /* 顶部亮橙色 */
            stop:0.2 #ff801a,
            stop:0.4 #fc7219,  /* 接近指定的rgb(252, 114, 25) */
            stop:0.6 #f96600,
            stop:0.8 #f25900,
            stop:1 #e64e00 /* 底部深橙色 */
        );
        
        /* 三层边框效果 */
        border: 2px solid rgba(255,255,255,0.3);
        border-top: 2px solid rgba(255,255,255,0.5);
        border-bottom: 2px solid rgba(0,0,0,0.3);
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ffaa4d,
            stop:0.2 #ff9933,
            stop:0.4 #ff801a,
            stop:0.6 #fc7219,
            stop:0.8 #f96600,
            stop:1 #f25900
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff801a,
            stop:0.2 #ff6600,
            stop:0.4 #f25900,
            stop:0.6 #e64e00,
            stop:0.8 #d94500,
            stop:1 #cc3e00
        );
        
        border: 2px solid rgba(0,0,0,0.3);
        border-top: 2px solid rgba(0,0,0,0.5);
        
        padding-top: 16px;
        padding-bottom: 10px;
    }
    
    QPushButton:disabled {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #dddddd,
            stop:1 #bbbbbb
        );
        color: #888888;
        border: 2px solid rgba(0,0,0,0.1);
    }
)";

QString pushButton_gripper_style = R"(
    QPushButton {
        font-family:  Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        border-radius: 40px;
        padding: 5px 10px;
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff4444,
            stop:0.3 #e60000,
            stop:0.7 #cc0000,
            stop:1 #b30000
        );
    }
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #ff6666,
            stop:0.3 #ff3333,
            stop:0.7 #e60000,
            stop:1 #cc0000
        );
    }
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #cc0000,
            stop:0.3 #b30000,
            stop:0.7 #990000,
            stop:1 #800000
        );
    }
    QPushButton:disabled {
        background: #cccccc;
        color: #888888;
        border: 3px solid #aaaaaa;
    }
)";
    
QString pushButton_gripper_pressed_style = R"(
    QPushButton {
        font-family:  Microsoft YaHei;
        font-weight: bold;
        font-size: 45px;
        color: white;
        border-radius: 40px;
        padding: 8px 14px;
        
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #5cb85c,
            stop:0.3 #4cae4c,
            stop:0.7 #409140,
            stop:1 #378137
        );
    }
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #62c462,
            stop:0.3 #5cb85c,
            stop:0.7 #4cae4c,
            stop:1 #409140
        );
        box-shadow: 
            0 8px 16px rgba(0,0,0,0.4),
            0 4px 4px rgba(0,0,0,0.2) inset,
            0 -4px 4px rgba(255,255,255,0.3) inset,
            3px 3px 0 rgba(255,255,255,0.15) inset,
            -3px -3px 0 rgba(0,0,0,0.15) inset,
            0 0 10px rgba(0,0,0,0.2);
    }
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #409140,
            stop:0.3 #378137,
            stop:0.7 #2e712e,
            stop:1 #276327
        );
    }
    QPushButton:disabled {
        background: #cccccc;
        color: #888888;
        border: 3px solid #aaaaaa;
    }
)";

QString pushButton_ch_style = R"(
    QPushButton {
        font-family: "Microsoft YaHei";
        font-weight: bold;
        font-size: 30px;
        color: white;
        border-radius: 30px;
        padding: 8px 14px;
        
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #e0e0e0,  /* 非常浅的灰 */
            stop:0.3 #d0d0d0, /* 浅灰 */
            stop:0.7 #c0c0c0, /* 稍深一点的浅灰 */
            stop:1 #b0b0b0  /* 较浅的灰 */
        );
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #f0f0f0,  /* 接近白色的浅灰 */
            stop:0.3 #e0e0e0, /* 非常浅的灰 */
            stop:0.7 #d0d0d0, /* 浅灰 */
            stop:1 #c0c0c0  /* 稍深一点的浅灰 */
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #c0c0c0,  /* 稍深一点的浅灰 */
            stop:0.3 #b0b0b0, /* 较浅的灰 */
            stop:0.7 #a0a0a0, /* 深一点的灰 */
            stop:1 #909090  /* 更深的灰 */
        );
    }
    
    QPushButton:disabled {
        background: #d0d0d0;
        color: #999999;
        border: 3px solid #c0c0c0;
    }
)";

QString radioButton_style = R"(
        QRadioButton {
        background-color: #e0e0e0;
        border: 3px solid #e0e0e0;
        border-radius: 15px;
        padding: 4px;
        font-family: Microsoft YaHei; 
        font:bold; font-size: 30px; color: black;
    }
    QRadioButton:checked {
        background-color:rgba(160, 160, 160, 0.89);
        border: 3px solid rgba(160, 160, 160, 0.89);
        border-radius: 15px;
        font:bold; font-size: 30px; color: white;
    }
    QRadioButton::indicator {
        width: 20px;
        height: 20px;
    }
    QRadioButton::indicator:checked {
        background-color: green;
        border-radius: 10px;
    })";

QString button_XYZ_style = R"(
    QPushButton {
        font-family: "Microsoft YaHei";
        font-weight: bold;
        font-size: 35px;
        color: white;
        border-radius: 30px;
        padding: 8px 14px;
        
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #64b5f6,  /* 浅蓝 */
            stop:0.3 #42a5f5, /* 中浅蓝 */
            stop:0.7 #2196f3, /* 中蓝 */
            stop:1 #1976d2  /* 深蓝 */
        );
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #81c4f8,  /* 更亮的浅蓝 */
            stop:0.3 #64b5f6, /* 浅蓝 */
            stop:0.7 #42a5f5, /* 中浅蓝 */
            stop:1 #2196f3  /* 中蓝 */
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #2196f3,  /* 中蓝 */
            stop:0.3 #1976d2, /* 深蓝 */
            stop:0.7 #1565c0, /* 更深蓝 */
            stop:1 #0d47a1  /* 最深蓝 */
        );
    }
    
    QPushButton:disabled {
        background: #cccccc;
        color: #888888;
        border: 3px solid #aaaaaa;
    }
)";

QString button_RXYZ_style = R"(
    QPushButton {
        font-family: "Microsoft YaHei";
        font-weight: bold;
        font-size: 35px;
        color: white;
        border-radius: 30px;
        padding: 8px 14px;
        
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #81c784,  /* 浅绿 */
            stop:0.3 #4caf50, /* 中绿 */
            stop:0.7 #388e3c, /* 深绿 */
            stop:1 #2e7d32  /* 更深的绿 */
        );
    }
    
    QPushButton:hover {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #a5d6a7,  /* 更亮的浅绿 */
            stop:0.3 #81c784, /* 浅绿 */
            stop:0.7 #4caf50, /* 中绿 */
            stop:1 #388e3c  /* 深绿 */
        );
    }
    
    QPushButton:pressed {
        background: qlineargradient(
            x1:0, y1:0, x2:0, y2:1,
            stop:0 #388e3c,  /* 深绿 */
            stop:0.3 #2e7d32, /* 更深的绿 */
            stop:0.7 #27662b, /* 更深沉的绿 */
            stop:1 #215725  /* 最深的绿 */
        );
    }
    
    QPushButton:disabled {
        background: #cccccc;
        color: #888888;
        border: 3px solid #aaaaaa;
    }
)";
#endif // QSS_STYLE_H
